# -*- coding: utf-8 -*-
# @FileName :execute.py
# @Time :2024-01-31 09:11
# author: 小燕子
from ..Package.Request import Request

def execute(data):
    r = Request()  # 实例化对象
    for i in data:
        """多接口测试token"""
        r.run(**i["request"])  # 请求
        if i.get("extract_data", False):
            r.argument(**i["extract_data"])  # 提取数据
        if i.get("assert_business", False):  # i.get(value1,value2); i["value1"]
            r.assert_business(i["assert_business"])  # 断言业务正确性
        if i.get("assert_sql"):
            r.assert_sql(i["assert_sql"])  # 断言数据正确性
        print(r.json)
